import java.io.*;
import java.util.*;

public class Data {
    public static void main(String[] args) {
        char[] cs = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
                't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
                'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
        Random random = new Random();
        try (FileWriter fw = new FileWriter(new File("data.txt"))) {
            for (int i = 0; i < 50; i++) {
                StringBuilder sb = new StringBuilder();
                for (int j = 0; j < 50; j++) {
                    sb.append(cs[random.nextInt(cs.length)]);
                }
                int a = random.nextInt(10) + 1;
                int b = a + random.nextInt(10) + 1;
                int c = b + random.nextInt(25) + 1;
                fw.write("INSERT INTO `message`(`id`, `title`, `author`, `content`, `ptime`, `ip`) VALUES (null,'"
                        + sb.toString().substring(0, a) + "','" + sb.toString().substring(a, b) + "','"
                        + sb.toString().substring(b, c) + "'," + new Date().getTime() + ",'::1');\n");
            }
            fw.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}